package com.gosling.cloudspace.common.entity;


import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * @email 1793327033@qq.com
 * @classname PageRequestDto
 * @author: osc_lihonglin
 * @date: 2021/6/23 22:05
 */
@Data
@Slf4j
public class PageRequestDto {

    private Integer size;
    private Integer page;
    private Integer currPage;
    private String queryString;

    public void checkParam() {
        if (this.page == null || this.page < 0) {
            setPage(1);
        }
        if (this.size == null || this.size < 0 || this.size > 100) {
            setSize(12);
        }
    }
}
